package com.qingfeng.provide.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.qingfeng.core.dao.qingfeng.SchoolDao;
import com.qingfeng.core.entity.qingfeng.School;

@Service
public class SchoolService {

    @Autowired
    SchoolDao schoolDao;
    
    /**
     * 添加
     * @param school
     * @return
     */
    @Transactional
    public boolean save(School school){
    	return schoolDao.save(school);
    }
    
    /**
     * 根据地区查询相关的学校
     * @return
     */
	public List<School> getSchoolList(int area_id){
		return schoolDao.getSchoolList(area_id);
	}
}
